package com.scau.service.impl;

import com.scau.dao.PushRecordMapper;
import com.scau.pojo.PushRecord;
import com.scau.pojo.PushRecordExample;
import com.scau.service.IPushRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PushRecordServiceImpl implements IPushRecordService {

    @Autowired
    private PushRecordMapper mapper;

    @Override
    public Integer insertRecored(PushRecord pushRecord) {

        int i =mapper.insert(pushRecord);
        return i;
    }

    @Override
    public List<PushRecord> seletPushRecordByEshopId(String eshopId) {
        PushRecordExample example = new PushRecordExample();
        example.createCriteria().andEshopIdEqualTo(eshopId);
        List<PushRecord> pushRecords = mapper.selectByExample(example);

        return pushRecords;
    }
}
